#ifndef __HELLOWORLD_SCENE_H__
#define __HELLOWORLD_SCENE_H__

#include "cocos2d.h"

class HelloWorld : public cocos2d::Layer
{
public:
    static cocos2d::Scene* createScene();

    virtual bool init();
    
    CREATE_FUNC(HelloWorld);
    
    enum BrushMode{
        Front = 0,
        Back,
        Up,
        Down
    };
    
    typedef struct Tooth{
        //是否清洁
        bool isClear = false;
        //正在清晰
        bool isBrushing = false;
        //刷洗次数
        int num = 0;
    }Tooth;
    
private:
    //> 初始化各类Label和按钮
    void initButton();
    //> 初始化牙齿
    void initToothRegion();
    //> 打开嘴巴
    void openMouse();
    //> 关闭嘴巴
    void closeMouse();
    
    void warning(const std::string str);
    // ======== 刷牙动作 ========
    void BrushTeeth(BrushMode mode);
    
    //> 清空有颜色的牙齿
    void clearTeenth();
private:
    cocos2d::Size _visibleSize;
    bool _shockflag = false;
    bool _openFlag = false;
    Tooth teeth[20];
};

#endif // __HELLOWORLD_SCENE_H__
